
package com.kuqi.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;

/**
 * @author:kuqi
 * @createTime:2021/11/10 16:30
 * @description:用于接收分页的数据封装到该实体类
 */


public class PageVo {
    private Integer pageNum = 1;   //当前页
    private Integer pageSize = 10;  //每页显示的记录数
    private String searchContent = ""; //内容
    private Integer skipSize;

    public PageVo() {
    }


    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getSearchContent() {
        return searchContent;
    }

    public void setSearchContent(String searchContent) {
        this.searchContent = searchContent;
    }


    /**
     * @return返回略过数
     */
    public int getSkipSize() {
        return skipSize = (this.getPageNum() - 1) * this.pageSize;
    }

    @Override
    public String toString() {
        return "PageVo{" +
                "pageNum=" + pageNum +
                ", pageSize=" + pageSize +
                ", searchContent='" + searchContent + '\'' +
                ", skipSize=" + skipSize +
                '}';
    }
}
